package com.tutu.sys.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.tutu.common.GlobalConstants;
import com.tutu.sys.dao.SysLogMapper;
import com.tutu.sys.entity.SysLog;
import com.tutu.sys.entity.SysLogExample;
import com.tutu.sys.entity.SysLogExample.Criteria;
import com.tutu.sys.service.ISysLogService;

@Service("sysLogService")
public class SysLogServiceImpl implements ISysLogService {

	@Resource
	private SysLogMapper sysLogMapper;
	
	@Override
	public List<SysLog> getSysLogs(SysLog sysLog) throws Exception {
		SysLogExample sysLogExample = new SysLogExample();
		Criteria criteria = sysLogExample.createCriteria();
		criteria.andAliveFlagEqualTo(GlobalConstants.FLAG_ENABLE);
		sysLogExample.setOrderByClause("CREATE_TIME DESC");
		return this.sysLogMapper.selectByExample(sysLogExample);
	}
	

}
